import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import api from "./api";
import "./permission";
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
import directive from "./directive";
Vue.config.productionTip = false;
Vue.prototype.$api = api;
Vue.use(ElementUI);
Vue.use(directive); // 使用Vue.use()的前提是 这个插件有install方法

// 注册指令
// 注册过滤器
Vue.filter("timeToDate2", value => {
	return new Date(value).toLocaleDateString();
});
new Vue({
	router,
	store,
	render: h => h(App),
}).$mount("#app");
